<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  class User {
    name ='A'
       get1(){
         console.log(this.name);
       }
  }

  class Boy extends User{
    name ='B'
    get2(){
      /*
      * 这里虽然使用this调用父类的方法其实还是子类在调用 方法中的this还是子类对象
      * */
     super.get1()
      console.log(this.name);
    }

  }

  let boy = new Boy()
  boy.get2()




</script>
</body>
</html>